$(function() {
    new Lazyload({});
    $('.index-plate-3 img').height($('.index-plate-3 img').width());
    $('.comm-slide-nav').load('slidenav.html');
    $('.index-footer').load('footer.html');
    $(window).resize(function() { $('.index-plate-3 img').height($('.index-plate-3 img').width()); });
    $('.comm-nav div:nth-child(2)').click(function() {
        $('.comm-cover').css({'top':'0','z-index':'60'}).show();
        $('.comm-region').hide();
        $('.comm-slide-nav').css('right', '0');
    });
    $('.comm-cover').click(function() {
        $('html').removeClass('comm-noscrol');
        $('.comm-slide-nav').css('right', '-70%');
        $('.comm-cover,.comm-region').hide();
    });
    $('.comm-nav-title').click(function() {
        $('.comm-cover').css({'top':'60px','z-index':'10'}).show();
        $('.comm-region').show();
        $('html').addClass('comm-noscrol');
    });
//禁止遮罩滑动
    $('.comm-cover').on('touchmove', function(event) {
        event.preventDefault();
    });
    //点击分类
    $('.comm-nav-ul a').click(function(){
        $('.comm-nav-ul a').removeClass('selected');
        $(this).addClass('selected');
    });
    //点击省份
    $('.comm-province ul li').click(function(){
        $('.comm-province ul li').removeClass('selected');
        $('.comm-province ul li span').remove();
        $(this).addClass('selected').append('<span></span>');

    });
});